package cn.edu.tju.elm.service;

import cn.edu.tju.elm.model.Order;
import cn.edu.tju.elm.model.OrderDetailet;
import java.util.List;
import java.util.Optional;

public interface OrderService {
    Optional<Order> findById(Long id);
    List<Order> findByCustomerId(Long userId);
    List<Order> findByBusinessId(Long businessId);
    Order createOrderFromCart(Long userId, Long businessId,Order order);
    List<OrderDetailet> findOrderDetailetById(Long orderId);//根据订单ID获取订单详情
    Order updateOrderState(Long orderId, Integer orderState);
}